const CracoLessPlugin = require("craco-less");
// const CracoAntDesignPlugin = require("craco-antd");
const path = require("path");

module.exports = {
	webpack: {
		alias: {
			"@": path.resolve(__dirname, "src"),
		},
	},
	plugins: [
		{
			plugin: CracoLessPlugin,
			options: {
				customizeTheme: {
					"@primary-color": "#1DA57A",
				},
				babelPluginImportOptions: {
					libraryName: "antd",
					libraryDirectory: "es",
					style: true,
				},
				lessLoaderOptions: {
					lessOptions: {
						modifyVars: { "@primary-color": "#1DA57A" }, //antd 主题
						javascriptEnabled: true,
					},
				},
			},
		},
		// {
		// 	plugin: CracoAntDesignPlugin,
		// 	options: {
		// 		customizeTheme: {
		// 			"@primary-color": "#1DA57A",
		// 		},
		// 	},
		// },
	],
};
